import { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage'
import Vue from 'vue'
import {UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types"

// 查询年总销售额
const totalTurnover = (params)=>getAction("/fep/fepOrders/allSalesTotal",params);


// 查询月度销售额
const monthlySales = (params)=>getAction("/fep/fepOrders/monthlySales",params);

// 查询月总销售额
const monthTotalTurnover = (params)=>getAction("/fep/fepOrders/monthAllSalesTotal",params);


// 查询日总销售额
const dayTotalTurnover = (params)=>getAction("/fep/fepOrders/dayAllSalesTotal",params);


// 查询年订单数
const orderCount = (params)=>getAction("/fep/fepOrders/allOrders",params);

// 查询月度订单数
const monthlyOrders = (params)=>getAction("/fep/fepOrders/monthlyOrders",params);

// 查询年已结清订单数
const settleOrderCount = (params)=>getAction("/fep/fepOrders/allSettleOrders",params);

// 查询年未结清订单数
const noSettleOrderCount = (params)=>getAction("/fep/fepOrders/allNoSettleOrders",params);

// 查询年未结清订单占比
const noSettleOrdersRatio = (params)=>getAction("/fep/fepOrders/noSettleOrdersRatio",params);

// 查询月订单数
const monthOrderCount= (params)=>getAction("/fep/fepOrders/monthAllOrders",params);


// 查询日订单数
const dayOrderCount = (params)=>getAction("/fep/fepOrders/dayAllOrders",params);

// 统计十日订单数
const lastTenDaysOrders = (params)=>getAction("/fep/fepOrders/lastTenDaysOrders",params);

// 查询年支付笔数
const payCount = (params)=>getAction("/fep/fepOrders/allPaysCount",params);

// 查询月支付笔数
const monthPayCount = (params)=>getAction("/fep/fepOrders/monthAllPaysCount",params);

// 查询日支付笔数
const dayPayCount = (params)=>getAction("/fep/fepOrders/dayAllPaysCount",params);

// 查询十日支付笔数
const lastTenDaysPaysCount = (params)=>getAction("/fep/fepOrders/lastTenDaysPaysCount",params);

// 查询销量top10的水果
const lastTopProductsSales = (params)=>getAction("/fep/fepOrders/lastTopProductsSales",params);

// 查询欠费top10的消费者
const lastTopUpaidTotal = ()=>getAction("/fep/fepOrders/lastTopUpaidTotal");

export {
    totalTurnover,
    monthlySales,
    monthTotalTurnover,
    dayTotalTurnover,
    orderCount,
    monthlyOrders,
    settleOrderCount,
    noSettleOrderCount,
    noSettleOrdersRatio,
    monthOrderCount,
    dayOrderCount,
    lastTenDaysOrders,
    payCount,
    monthPayCount,
    dayPayCount,
    lastTenDaysPaysCount,
    lastTopProductsSales,
    lastTopUpaidTotal
    
}